# Author ： chosen-yn

from rest_framework.response import Response


class APIResponse(Response):
    def __init__(self, code=100, msg='OK', headers=None, status=None, **kwargs):
        data = {'code': code, 'msg': msg}
        if kwargs:
            data.update(kwargs)  # {'code': code, 'msg': msg,'token':aaa.bbb.ccc}
        super().__init__(data=data, headers=headers, status=status)
